package com.example.dao;

import com.example.entity.UserName;

public class UsernameImpl extends BaseDao<UserName> implements UsernameDao {
    @Override
    public UserName getUsername(String username, String password) {
        String sql = "select * from usersoutside where username = ? and password = ?";
        return this.getBean(DataSourcePool.getConnection(), sql, username, password);
    }

    @Override
    public int getregister(String username, String password) {
        String sql = "INSERT into usersoutside values(null,?,?)";
        return this.update(DataSourcePool.getConnection(), sql, username, password);
    }

    @Override
    public int delecter(String username, String password) {
        String sql = "delete * from usersoutside where username =?,password =?";
        return this.update(DataSourcePool.getConnection(), sql, username, password);
    }

}
